<script lang="ts" setup>
import { fetchUserById } from "../../api/fileHelp";
import { useRequest } from "../../hooks";
import { userDtoType } from "../../api/fileHelp/dto-type";
import { userFetchType } from "../../api/fileHelp/fetch-type";

const { data, loading, fetch } = useRequest<userDtoType, userFetchType>(
  fetchUserById,
  { params: { userId: "mock-user-id" } }
);
</script>
<template>
  <div @click="fetch">fetch</div>
  {{ data }}
  {{ loading }}
</template>
